package com.yj.springbootmybatis.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtils {

    private static final String YYYY_MM_DD = "yyyy-MM-dd";


    public static Date parseStr(String strTime){
        Date date = null;
        try {
            SimpleDateFormat format = new SimpleDateFormat(YYYY_MM_DD);
            date = format.parse(strTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }

    public static void main(String[] args) {
        Date date = parseStr("1900-01-01");
        System.out.println(date);
    }


}
